export default [
  {
    path: '/home',
    name: 'home',
    component: () => import('../views/home.vue'),
    children: [
      {
        path: '/home/index',
        name: 'index',
        component: () => import('../views/home/index.vue'),

      },
      {
        path: '/home/bbt',
        name: 'bbt',
        component: () => import('../views/home/bbt.vue'),

      },
      {
        path: '/home',
        redirect: '/home/index'//重定向
      },
      // 404路由
      {
        path: '/home/:error(.*)', //必须写成 正则的语法
        component: () => import('../views/NotFound.vue')
      }
    ]
  },
  {
    path: '/about',
    name: 'about',
    component: () => import('../views/about.vue'),
  },
  {
    path: '/',
    redirect: 'home'//重定向
  },
  // 404路由
  {
    path: '/:error(.*)', //必须写成 正则的语法
    component: () => import('../views/NotFound.vue')
  }
]
